# Maintainer: Bruno Pagani <archange@archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Emil Renner Berthing <esmil@users.sourceforge.net>

pkgname=mktorrent
pkgver=1.1
pkgrel=6
pkgdesc="Simple command line utility to create BitTorrent metainfo files"
arch=(loong64 x86_64)
url="https://github.com/pobrn/mktorrent"
license=(GPL)
depends=(openssl)
source=(https://github.com/pobrn/mktorrent/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('d0f47500192605d01b5a2569c605e51ed319f557d24cfcbcb23a26d51d6138c9')

build() {
  cd ${pkgname}-${pkgver}
  make PREFIX=/usr USE_PTHREADS=1 USE_OPENSSL=1 USE_LONG_OPTIONS=1
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" USE_PTHREADS=1 USE_OPENSSL=1 PREFIX=/usr install
}
